<template>
  <!-- 顶部通栏 -->
  <app-topnav></app-topnav>
  <!-- 顶部布局 -->
  <app-header></app-header>
  <main>
    <!-- 二级路由 -->
    <router-view></router-view>
  </main>
  <!-- 底部布局 -->
<app-footer></app-footer>
</template>

<script>
// 导入顶部通栏
import AppTopnav from "@/components/app-topnav.vue";
// 顶部布局
import AppHeader from "@/components/app-header.vue";
// 底部布局
import AppFooter from "@/components/app-footer.vue"
import { useStore } from 'vuex';
export default {
  name: "xtx-layout",
  components: { AppTopnav, AppHeader, AppFooter },
  setup() {
    const store = useStore()
    store.dispatch('category/getList')
  }
};
</script>

<style scoped lang="less">
.app-body {
    min-height: 600px;
}
</style>